package com.franklin.java.utils;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;

import java.util.Map;

/**
 * @author Franklin
 * @since 2021/08/28 15:39
 */
public class BeanUtils {

    public static <E> E clone(E entity){
        String jsonString = JsonUtils.toJsonString(entity);
        return JsonUtils.parseObject(jsonString,(Class<E>)entity.getClass());
    }

}
